<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>日常任务生成管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
 
	<form:form id="searchForm" modelAttribute="fieldDailyTask" action="${ctx}/field/fieldDailyTask/audit" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>机器码：</label>
				<form:input path="code" htmlEscape="false" maxlength="50" class="input-medium"/>
			</li>
			<li><label>任务类型：</label>
				<form:select path="type" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('field_task_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>执行人：</label>
				<sys:treeselect id="user" name="user.id" value="${fieldDailyTask.user.id}" labelName="user.name" labelValue="${fieldDailyTask.user.name}"
					title="用户" url="/sys/office/treeData?type=3" cssClass="input-small" allowClear="true" notAllowSelectParent="true"/>
			</li>
			<li><label>状态：</label>
				<form:select path="state" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('field_task_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>标题</th>
				<th>执行人</th>
				<th>任务类型</th>
				<th>地点</th>
				<th>执行时间</th>
				<th>状态</th>  
				<th>备注信息</th>
				<shiro:hasPermission name="field:fieldDailyTask:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="fieldDailyTask">
			<tr>
				<td><a href="${ctx}/field/fieldDailyTask/form?id=${fieldDailyTask.id}">
					${fieldDailyTask.title}
				</a></td>
				<td>
					${fieldDailyTask.user.name}
				</td>
				<td>
					${fns:getDictLabel(fieldDailyTask.type, 'field_task_type', '')}
				</td>
				<td>
					${fieldDailyTask.address}
				</td>
				<td>
					${fieldDailyTask.executeTime}
				</td> 
				<td>
					${fns:getDictLabel(fieldDailyTask.state, 'field_task_state', '')}
				</td>  
				<td>
					${fieldDailyTask.remarks}
				</td>
				<shiro:hasPermission name="field:fieldDailyTask:edit"><td>
    				<a href="${ctx}/field/fieldDailyTask/form?id=${fieldDailyTask.id}">核查</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>